package com.baijing.springcloud.web;

import com.baijing.springcloud.domain.Person;
import com.baijing.springcloud.service.PersonHystrixService;
import com.baijing.springcloud.service.PersonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
public class PersonController {

    @Autowired
    private PersonService personService;

    @RequestMapping(value = "/save", method = RequestMethod.POST)
    public List<Person> save(@RequestBody String name) {
        return personService.save(name);
    }
}
